.remote
  = simple_form_for(@contact, html: one_submit_only, remote: true) do |f|
    = link_to_close edit_contact_path(@contact)
    = f.hidden_field :user_id

    = f.error_messages object_name: t('contact')

    = render "contacts/top_section", f: f, edit: true
    = render "fields/edit_custom_field_group", f: f, edit: true
    = render "contacts/extra",       f: f, edit: true
    = render "contacts/web",         f: f, edit: true
    = render "fields/groups",        f: f, edit: true
    = render "entities/permissions", f: f, edit: true, entity: @contact
    = hook(:entity_form, self, {f: f, entity: @contact})

    .buttonbar
      = f.submit t(:save_contact), onclick: "crm.save_contact()", class: 'btn btn-primary'
      #{t :or}
      = link_to_cancel edit_contact_path(@contact)
